import request from '@/axios'
import type { TableData } from './types'
//分组管理列表
export const getTableListApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: '/api/v1/bnb/page.do', data })
}
export const saveTableApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: 'api/v1/bnb/update.do', data })
}
// 获取用户页面数据
export const getUserPageApi = (): Promise<IResponse> => {
  return request.post({ url: '/api/v1/user/page.do' })
}
// 刷新用户余额
export const refreshUserBalanceApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: '/api/v1/bnb/ubalance.do', data })
}
// 操手名
export const operatorNameApi = (): Promise<IResponse> => {
  return request.post({ url: '/api/v1/baopr/getname.do' })
}
// 日历数据

export const getCalendarDataApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: '/api/v1/bnb/profit.do', data })
}

// 参与空投项目

export const getProjectOptionsListApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: '/api/v1/bnb/dayinc.do', data })
}

// 保存积分和收益

export const saveScoreIcomeApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: '/api/v1/bnb/savescore.do', data })
}
// 刷新多个用户余额
export const allrefreshUserBalanceApi = (data: { ids: string[] }): Promise<IResponse> => {
  return request.post({ url: '/api/v1/bnb/umultibal.do', data })
}
// 参与的项目
export const getAlphaprjApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: '/api/v1/bnb/alphaprj.do', data })
}
// 出入金日历
export const getIohistoryApi = (data: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: '/api/v1/bnb/iohistory.do', data })
}